package com.unknown

import grails.converters.JSON
import grails.plugins.springsecurity.Secured;

@Secured(['ROLE_ADMIN', 'ROLE_USER'])
class ConsoleController {
	
	def read = {
		def result = [id:0, message:'Console Message'];
		render result as JSON
	}
	
	def post = {
		def obj = JSON.parse(params.json)
		def converter = obj as JSON
		println( converter.toString(true) );
		def result = [msg:'success'];
		render result as JSON
	}
}
